<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>DOM外部插入insertAfter()与insertBefore()</title>
	<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	<script>
		$(document).ready(function() {
			$("<div>测试insertAfter</div>").insertAfter($("#insertAfter"));
			$("<div>测试insertBefore</div>").insertBefore($("#insertBefore"));
		});
	</script>
</head>
<body>
	<div id="insertAfter">insertAfter</div>
	<div id="insertBefore">insertBefore</div>
</body>
</html>